From c92959a4485fa1d09404fcc21a17672c565a69e1 Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Mon, 15 Aug 2005 14:53:00 +0000 Subject: [PATCH] Use g_path_get_dirname() instead of the nonportable and 2005-08-15 Tor Lillqvist * gtk/updateiconcache.c: Use g_path_get_dirname() instead of the nonportable and dirname(). --- ChangeLog | 5 +++++ ChangeLog.pre-2-10 | 5 +++++ ChangeLog.pre-2-8 | 5 +++++ gtk/updateiconcache.c | 10 +++++----- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2cf76c7be7..1e6d558b97 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-08-15 Tor Lillqvist + + * gtk/updateiconcache.c: Use g_path_get_dirname() instead of + the nonportable and dirname(). + 2005-08-15 Matthias Clasen * gtk/gtksizegroup.c: Use object data to mark widgets and diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 2cf76c7be7..1e6d558b97 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-08-15 Tor Lillqvist + + * gtk/updateiconcache.c: Use g_path_get_dirname() instead of + the nonportable and dirname(). + 2005-08-15 Matthias Clasen * gtk/gtksizegroup.c: Use object data to mark widgets and diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 2cf76c7be7..1e6d558b97 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,8 @@ +2005-08-15 Tor Lillqvist + + * gtk/updateiconcache.c: Use g_path_get_dirname() instead of + the nonportable and dirname(). + 2005-08-15 Matthias Clasen * gtk/gtksizegroup.c: Use object data to mark widgets and diff --git a/gtk/updateiconcache.c b/gtk/updateiconcache.c index ae2c38d612..9f5fd56b86 100644 --- a/gtk/updateiconcache.c +++ b/gtk/updateiconcache.c @@ -33,7 +33,6 @@ #else #include #endif -#include #include #include @@ -343,12 +342,13 @@ follow_links (const gchar *path) if (target) { - if (target[0] == '/') - path2 = target; + if (g_path_is_absolute (target)) + path2 = target; else { - d = dirname (path2); - s = g_build_path ("/", d, target, NULL); + d = g_path_get_dirname (path2); + s = g_build_filename (d, target, NULL); + g_free (d); g_free (target); g_free (path2); path2 = s; -- 2.30.2